home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 2002 November / SGI Freeware 2002 November - Disc 3.iso / dist / fw_mysql.idb / usr / freeware / catman / u_man / cat1 / mysqldump.Z / mysqldump
Encoding:
Text File  |  2002-10-07  |  10.4 KB  |  242 lines

  1. MYSQLDUMP(1)                         MYSQLDUMP(1)
  2.  
  3.  
  4.  
  5. NNAAMMEE
  6.        mysqldump  -  text-based     client    for dumping or backing up
  7.        mysql databases,    tables and or data.
  8.  
  9. UUSSAAGGEE
  10.        mmyyssqqlldduummpp [[_O_P_T_I_O_N_S] database [_t_a_b_l_e_s_]
  11.  
  12.        OR     mmyyssqqlldduummpp    [[_O_P_T_I_O_N_S] --databases [_O_P_T_I_O_N_S_]    _D_B_1  _[_D_B_2
  13.           _D_B_3_._._._]
  14.  
  15.        OR     mmyyssqqlldduummpp    [[_O_P_T_I_O_N_S] --all-databases [_O_P_T_I_O_N_S_]
  16.  
  17. OOPPTTIIOONN SSYYNNOOPPSSIISS
  18.        mmyyssqqlldduummpp [--AA|----aallll--ddaattaabbaasseess] [--aa|----aallll] [--##|----ddeebbuugg==......]
  19.        [----cchhaarraacctteerr--sseettss--ddiirr==......]]   [--??|----hheellpp]     [--BB|----ddaattaabbaasseess]
  20.        [--cc|----ccoommpplleettee--iinnsseerrtt]  [--CC|----ccoommpprreessss] [----ddeeffaauulltt--cchhaarraacc
  21.        tteerr--sseett==......]]   [--ee|----eexxtteennddeedd--iinnsseerrtt]   [----aadddd--ddrroopp--ttaabbllee]
  22.        [----aadddd--lloocckkss]     [----aallllooww--kkeeyywwoorrddss]    [----ddeellaayyeedd--iinnsseerrtt]
  23.        [--FF|----fflluusshh--llooggss]       [--ff|----ffoorrccee]      [--hh|----hhoosstt==......]
  24.        [--ll|----lloocckk--ttaabblleess]   [--nn|----nnoo--ccrreeaattee--ddbb]     [--tt|----nnoo--ccrreeaattee--
  25.        iinnffoo] [--dd|----nnoo--ddaattaa] [--OO|----sseett--vvaarriiaabblleevar=_o_p_t_i_o_n]] [----oopptt]
  26.        [--pp|----ppaasssswwoorrdd_[_=_._._._]]     [--PP|----ppoorrtt==......]     [--qq|----qquuiicckk]
  27.        [--QQ|----qquuoottee--nnaammeess]      [--SS|----ssoocckkeett==......]       [----ttaabblleess]
  28.        [--TT|----ttaabb==......]    [--uu|----uusseerr==##]  [--vv|----vveerrbboossee]  [--VV|----vveerr
  29.        ssiioonn]  [--ww|----wwhheerree==]  [----ddeellaayyeedd]   [--ee|----eexxtteennddeedd--iinnsseerrtt]
  30.        [----ffiieellddss--tteerrmmiinnaatteedd--bbyy==......]    [----ffiieellddss--eenncclloosseedd--bbyy==......]
  31.        [----ffiieellddss--ooppttiioonnaallllyy--eenncclloosseedd--bbyy==......]
  32.        [----ffiieellddss--eessccaappeedd--bbyy==......]      [----lliinneess--tteerrmmiinnaatteedd--bbyy==......]
  33.        [--vv|----vveerrbboossee]  [--VV|----vveerrssiioonn]  [--OO   nneett__bbuuffffeerr__lleennggtthh==##,,
  34.        wwhheerree ## << 1166MM]
  35.  
  36. DDEESSCCRRIIPPTTIIOONN
  37.        Dumping definition and data mysql database or table _m_y_s_q_l_
  38.        _d_u_m_p supports by    executing
  39.  
  40.        --AA|----aallll--ddaattaabbaasseess
  41.           Dump all    the  databases.     This  will  be     same  as
  42.           ----ddaattaabbaasseess with all databases selected.
  43.  
  44.        --aa|----aallll
  45.           Include all MySQL    specific create    options.
  46.  
  47.        --##|----ddeebbuugg==......
  48.           Output debug log.    Often this is 'd:t:o,filename`.
  49.  
  50.        ----cchhaarraacctteerr--sseettss--ddiirr==......
  51.           Directory    where character    sets are
  52.  
  53.        --??|----hheellpp
  54.           Display this help    message    and exit.
  55.  
  56.        --BB|----ddaattaabbaasseess
  57.           To  dump    several    databases. Note    the difference in
  58.           usage; In    this case no tables are    given.    All  name
  59.           arguments    are regarded as    databasenames.
  60.  
  61.        --cc|----ccoommpplleettee--iinnsseerrtt
  62.           Use complete insert statements.
  63.  
  64.        --CC|----ccoommpprreessss
  65.           Use compression in server/client protocol.
  66.  
  67.        ----ddeeffaauulltt--cchhaarraacctteerr--sseett==......
  68.           Set the default character    set
  69.  
  70.        --ee|----eexxtteennddeedd--iinnsseerrtt
  71.           Allows  utilization  of the new, much faster INSERT
  72.           syntax.
  73.  
  74.        ----aadddd--ddrroopp--ttaabbllee
  75.           Add a 'drop table' before    each create.
  76.  
  77.        ----aadddd--lloocckkss
  78.           Add locks    around insert statements.
  79.  
  80.        ----aallllooww--kkeeyywwoorrddss
  81.           Allow creation of    column names that are keywords.
  82.  
  83.        ----ddeellaayyeedd--iinnsseerrtt
  84.           Insert rows with INSERT DELAYED.
  85.  
  86.        --FF|----fflluusshh--llooggss
  87.           Flush logs file in server    before starting    dump.
  88.  
  89.        --ff|----ffoorrccee
  90.           Continue even if we get an sql-error.
  91.  
  92.        --hh|----hhoosstt==......
  93.           Connect to host.
  94.  
  95.        --ll|----lloocckk--ttaabblleess
  96.           Lock all tables for read.
  97.  
  98.        --nn|----nnoo--ccrreeaattee--ddbb
  99.           will not be put in the output. The above line  will
  100.           be    added    otherwise,       if     ----ddaattaabbaasseess   or
  101.           ----aallll--ddaattaabbaasseess option was given.
  102.  
  103.        --tt|----nnoo--ccrreeaattee--iinnffoo
  104.           Don't write table    creation info.
  105.  
  106.        --dd|----nnoo--ddaattaa
  107.           No row information.
  108.  
  109.        --OO|----sseett--vvaarriiaabbllee vvaarr==ooppttiioonn
  110.           give a variable a    value.    ----hheellpp lists variables
  111.  
  112.        ----oopptt  Same  as       ----aadddd--ddrroopp--ttaabbllee   ----aadddd--lloocckkss   ----aallll
  113.           ----eexxtteennddeedd--iinnsseerrtt    ----qquuiicckk    ----lloocckk--ttaabblleess
  114.  
  115.        --pp|----ppaasssswwoorrdd[[==......]]
  116.           Password    to  use     when  connecting  to server.  If
  117.           password is not given it's solicited on the tty.
  118.  
  119.        --PP|----ppoorrtt==......
  120.           Port number to use for connection.
  121.  
  122.        --qq|----qquuiicckk
  123.           Don't buffer query, dump directly    to stdout.
  124.  
  125.        --QQ|----qquuoottee--nnaammeess
  126.           Quote table and column names with    `
  127.  
  128.        --SS|----ssoocckkeett==......
  129.           Socket file to use for connection.
  130.  
  131.        ----ttaabblleess
  132.           _O_v_e_r_r_i_d_e_s    option ----ddaattaabbaasseess(-B).
  133.  
  134.        --TT|----ttaabb==......
  135.           Creates tab separated textfile for  each    table  to
  136.           given  path.  (creates .sql and .txt files).  NOTE:
  137.           This only    works if mysqldump is  run  on    the  same
  138.           machine as the mysqld daemon.
  139.  
  140.        --uu|----uusseerr==##
  141.           User for login if    not current user.
  142.  
  143.        --vv|----vveerrbboossee
  144.           Print info about the various stages.
  145.  
  146.        --VV|----vveerrssiioonn
  147.           Output version information and exit.
  148.  
  149.        --ww|----wwhheerree==
  150.           dump only    selected records; QUOTES mandatory!
  151.  
  152.        ----ddeellaayyeedd
  153.           Insert rows with the INSERT DELAYED command.
  154.  
  155.        --ee|----eexxtteennddeedd--iinnsseerrtt
  156.           Use  the    new  multiline INSERT syntax. (Gives more
  157.           compact and faster inserts statements.)
  158.  
  159.        ----ffiieellddss--tteerrmmiinnaatteedd--bbyy==......
  160.  
  161.        ----ffiieellddss--eenncclloosseedd--bbyy==......
  162.  
  163.  
  164.        ----ffiieellddss--ooppttiioonnaallllyy--eenncclloosseedd--bbyy==......
  165.  
  166.        ----ffiieellddss--eessccaappeedd--bbyy==......
  167.  
  168.        ----lliinneess--tteerrmmiinnaatteedd--bbyy==......
  169.           These options are    used with  the    --TT  option
  170.           and have the same    meaning    as the correspond
  171.           ing clauses for LOAD DATA    INFILE.    See  Mysql
  172.           manual section 7.23 LOAD DATA INFILE Syntax.
  173.  
  174.        --vv|----vveerrbboossee
  175.           Verbose mode. Print out more information    on
  176.           what the program does.
  177.  
  178.        --VV|----vveerrssiioonn
  179.           Print version information    and exit.
  180.  
  181.        --OO nneett__bbuuffffeerr__lleennggtthh==##,, wwhheerree ## << 1166MM
  182.           When  creating  multi-row-insert    statements
  183.           (as with option ----eexxtteennddeedd--iinnsseerrtt     or  ----oopptt
  184.           ),   mysqldump   will   create  rows  up    to
  185.           net_buffer_length    length.     If  you  increase
  186.           this  variable,  you should also ensure that
  187.           the max_allowed_packet variable in the MySQL
  188.           server is    bigger than the    net_buffer_length.
  189.  
  190. EEXXAAMMPPLLEESS
  191.        The most    normal use of mysqldump     is  probably  for
  192.        making  a backup    of whole databases. See    Mysql Man
  193.        ual section 21.2    Database Backups.
  194.  
  195.        mysqldump  --opt    _d_a_t_a_b_a_s_e > backup-file.sql
  196.  
  197.        You can read this back into MySQL with:
  198.  
  199.        mmyyssqqll  _d_a_t_a_b_a_s_e << backup-file.sql
  200.  
  201.        or
  202.  
  203.        mmyyssqqll  -e 'source /patch-to-backup/backup-file.sql'
  204.           database
  205.  
  206.        However,     it's also very    useful to populate another
  207.        MySQL server with information from a database:
  208.  
  209.        mysqldump --opt _d_a_t_a_b_a_s_e    | mysql    --host=_r_e_m_o_t_e_-_h_o_s_t
  210.        _-_C _d_a_t_a_b_a_s_e
  211.  
  212.        It  is  possible    to dump    several    databases with one
  213.        command:
  214.  
  215.        mysqldump   --databases     database1   [     database2
  216.        database3... ]  > my_databases.sql
  217.  
  218.        If all the databases are    wanted,    one can    use:
  219.  
  220.        mysqldump _-_-_a_l_l_-_d_a_t_a_b_a_s_e_s > all_databases.sql
  221.  
  222.  
  223. SSEEEE AALLSSOO
  224.        isamchk (1), isamlog (1), mysqlaccess (1), mysqlad
  225.        min (1),    mysqlbug (1), mysqld (1),  mysqldump  (1),
  226.        mysqlshow  (1), msql2mysql (1), perror (1), replace
  227.        (1), safe_mysqld    (1), which1 (1), zap (1),
  228.  
  229. AAUUTTHHOORR
  230.        Ver  1.0,  distribution    3.23.29a  Michael  (Monty)
  231.        Widenius      (monty@tcx.se),   TCX      Datakonsult    AB
  232.        (http://www.tcx.se).  This software comes  with    no
  233.        warranty.   Manual  page     by  L.     (Kill-9) Pedersen
  234.        (kill-9@kill-9.dk), Mercurmedia Data  Model  Archi
  235.        tect   /      system  developer  (http://www.mercurme
  236.        dia.com)
  237.  
  238.  
  239.  
  240.  
  241.              19 December 2000         MYSQLDUMP(1)
  242.